function getCache(key) {
  return wx.getStorageSync(key);
}

function setCache(key, value) {
  try {
    wx.setStorageSync(key, value);
  } catch (e) {
    console.error(e)
  }
}

function removeCache(key) {
  try {
    wx.removeStorageSync(key)
  } catch (e) {
    console.error(e)
  }
}

function clearCache() {
  try {
    wx.clearStorageSync()
  } catch (e) {
    console.error(e)
  }
}

module.exports = {
  getCache,
  setCache,
  removeCache,
  clearCache,
}